import concurrent.futures

def my_task(ip):
   print(f"Processing IP: {ip}")

ips = [1, 2, 3, 4, 5]

with concurrent.futures.ThreadPoolExecutor() as executor:
   futures = [executor.submit(my_task, ip) for ip in ips]

for future in concurrent.futures.as_completed(futures):
   future.result()